package cn.dnuihyy406.dnuifood_16110100406.controller;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import cn.dnuihyy406.dnuifood_16110100406.R;

public abstract class BaseActivity extends AppCompatActivity {
    protected int layout_file= R.layout.activity_main;
    abstract void initViews();
    abstract void initEvents();
    abstract void initData();
    void setLayout(int layout_file)
    {
        setContentView(layout_file);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setLayout(layout_file);
        initViews();
        initData();
        initEvents();
    }
}

